package com.yuda.campsite.service.impl;

import java.util.List;

import com.yuda.campsite.domain.CampsiteDistribution;
import com.yuda.campsite.domain.SpartaLog;
import com.yuda.campsite.mapper.CampsiteDistributionMapper;
import com.yuda.campsite.service.ICampsiteDistributionService;
import com.yuda.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author wyn
 * @date 2021-12-09
 */
@Service
public class CampsiteDistributionServiceImpl implements ICampsiteDistributionService
{
    @Autowired
    private CampsiteDistributionMapper campsiteDistributionMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param uuid 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public CampsiteDistribution selectCampsiteDistributionById(String uuid)
    {
        return campsiteDistributionMapper.selectCampsiteDistributionById(uuid);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param campsiteDistribution 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<CampsiteDistribution> selectCampsiteDistributionList(CampsiteDistribution campsiteDistribution)
    {
        return campsiteDistributionMapper.selectCampsiteDistributionList(campsiteDistribution);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param campsiteDistribution 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCampsiteDistribution(CampsiteDistribution campsiteDistribution)
    {
        campsiteDistribution.setCreateTime(DateUtils.getNowDate());
        return campsiteDistributionMapper.insertCampsiteDistribution(campsiteDistribution);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param campsiteDistribution 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCampsiteDistribution(CampsiteDistribution campsiteDistribution)
    {
        campsiteDistribution.setUpdateTime(DateUtils.getNowDate());
        return campsiteDistributionMapper.updateCampsiteDistribution(campsiteDistribution);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param uuids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteCampsiteDistributionByIds(String[] uuids)
    {
        return campsiteDistributionMapper.deleteCampsiteDistributionByIds(uuids);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param uuid 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteCampsiteDistributionById(String uuid)
    {
        return campsiteDistributionMapper.deleteCampsiteDistributionById(uuid);
    }

    @Override
    public List<SpartaLog> selectDistributionLogs(Integer campsiteId) {

        return campsiteDistributionMapper.selectDistributionLogs(campsiteId);
    }
}
